# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kblackbox
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/games/org.kde.kblackbox"
pkgdesc="A game of hide and seek played on a grid of boxes"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtsvg-dev karchive-dev kcoreaddons-dev kconfig-dev kcrash-dev kdoctools-dev ki18n-dev kdbusaddons-dev ktextwidgets-dev kxmlgui-dev libkdegames-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kblackbox-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="2b97dab5f04807f03d84fa9a5611b3bbe733db71cc88ef4bb240d67419eb0645cfd5ac7ba46ca25b71d3f8bb5862134b9c5b2d96ca8f763cfc32312a3b4a3399  kblackbox-20.04.3.tar.xz"
